<!DOCTYPE html>
<html>
<head th:replace="layouts::header">
</head>

<body>

<nav th:replace="layouts::navbar"></nav>
<div>
    <h3>&nbsp</h3>
</div>
<div class="distance">
    <form th:action="@{/students/save}" th:object="${student}" method="POST">

        <input type="hidden" th:field="${student.studentId}">


        <div class="down">
            <input type="text" placeholder="姓名" th:field="${student.name}">
            <span th:if="${#fields.hasErrors('name')}" th:errors="${student.name}"></span>
        </div>
        <div class="down">
            <input type="text" placeholder="学号" th:field="${student.numberId}">
            <span th:if="${#fields.hasErrors('numberId')}" th:errors="${student.numberId}"></span>
        </div>
        <div class="down">
            <input type="text" placeholder="学院" th:field="${student.college}">
            <span th:if="${#fields.hasErrors('college')}" th:errors="${student.college}"></span>
        </div><br>
        <input type="hidden" name="_csrf" th:value="${_csrf.token}">
        <button type="submit">新建信息</button>
    </form>
</div>
</body>
</html>